const { writeStandTablesData } = require("./core/compile/mysql");
const { writeFileSync } = require("./core/utils");
const { getCreateTablesSqlStr } = require("./design/easy-note/output");

// 写入表的JSON字符串
writeStandTablesData();

writeSqlStr();

// 生成创建sql表的语句
function writeSqlStr(writePath = "/scripts/note/temp.js") {
  // const tablesData = module.exports.getStandTablesData();
  // const fileStr = letDataToJsFile(tablesData, "exports.standTables =");
  const fileStr = `const str = \`${getCreateTablesSqlStr(undefined, true, true)}\``;
  writeFileSync(writePath, fileStr);
}
